#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1005;
const int M = 2e5 + 5;

int n, m;
int head[N];
int f[N][N];
int ver[M], Next[M], tot = 1;
void add(int u, int v) {
  ++tot;
  ver[tot] = v;
  Next[tot] = head[u];
  head[u] = tot;
}
int seq[N], low[N], num;
int st[N], top;
int scc[N], cnt;
vector<int> member[N];
set<int> ch[N];
void tarjan(int u, int ein) {
  seq[u] = low[u] = ++num;
  st[++top] = u;
  for (int i = head[u]; i; i = Next[i]) {
    if ((i ^ ein) == 1) continue;
    int v = ver[i];
    if (!seq[v]) {
      tarjan(v, i);
      low[u] = min(low[u], low[v]);
    } else {
      low[u] = min(low[u], seq[v]);
    }
  }
  if (seq[u] == low[u]) {
    ++cnt;
    do {
      scc[st[top]] = cnt;
      member[cnt].push_back(st[top]);
    } while (st[top--] != u);
  }
}
bool find(int& u, int& v) {
  for (int x : member[u]) {
    for (int y : member[v]) {
      if (!f[x][y]) {
        u = x, v = y;
        if (u > v) swap(u, v);
        return true;
      }
    }
  }
  return false;
}
vector<int> leaf;
void dfs(int u, int fu) {
  if (ch[u].size() == 1) leaf.push_back(u);
  for (int v : ch[u]) {
    if (v == fu) continue;
    dfs(v, u);
  }
}
void solve() {
  cin >> n >> m;
  rep(i, 1, m) {
    int u, v;
    cin >> u >> v;
    f[u][v] = f[v][u] = 1;
    add(u, v), add(v, u);
  }
  rep(i, 1, n) if (!seq[i]) tarjan(i, 0);
  if (cnt == 1) {
    cout << 0 << endl;
    return;
  }
  // rebuild tree
  rep(u, 1, n) {
    for (int i = head[u]; i; i = Next[i]) {
      int v = ver[i];
      if (scc[u] != scc[v]) {
        int a = scc[u], b = scc[v];
        ch[a].insert(b), ch[b].insert(a);
      }
    }
  }
  dfs(1, 0);
  int k = (leaf.size() + 1) / 2;
  int d = leaf.size() - k;
  vector<pii> ans;
  rep(i, 0, k - 1) {
    int j = i + d;
    int u = leaf[i], v = leaf[j];
    if (!find(u, v)) {
      cout << -1 << endl;
      return;
    }
    ans.push_back(pii(u, v));
  }
  cout << ans.size() << endl;
  for (pii p : ans) cout << p.first << ' ' << p.second << endl;
  return;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t;
  t = 1;
  while (t--) solve();
  return 0;
}